package com.sim.stream;

import com.sim.core.ImEnvironment;
import com.sim.core.utils.PropUtil;
import com.sim.stream.simclient.ImStreamClient;
import org.apache.commons.lang3.StringUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

import javax.annotation.Resource;

/**
 * 
 * 版本: [1.0]
 * 功能说明: 
 * @author : God 创建时间: 2017年8月30日 下午1:05:17
 */
@SpringBootApplication
public class ImStreamApplication {

	/**
	 * 启动程序入口
	 */
	public static void main(String[] args) throws Exception {
		ApplicationContext context = SpringApplication.run(ImStreamApplication.class, args);
		ImEnvironment.ENV = context.getBean(Environment.class).getProperty("spring.profiles.active");
		PropUtil.use("application.properties", ImEnvironment.ENV, null);
		ImStreamClient.init();
	}
}
